﻿<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true" CodeFile="OptClients.aspx.cs" Inherits="OptClients" Title="Project Monitoring System" Culture="auto:en-US" UICulture="auto" meta:resourcekey="PageResource1" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" Visible="false"/>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
	<div style="margin-left:10px;margin-right:10px;">
		<asp:Panel ID="panelSearch" runat="server">
			<fieldset>
				<legend>
					<asp:Label ID="lblSearch" runat="server" Text="Search" meta:resourcekey="lblSearchResource1"></asp:Label>
				</legend>
				<table>
					<tr>
						<td width="60" align="left">
							<asp:Label ID="lblSearchClient" runat="server" Text="Client" meta:resourcekey="lblSearchClientResource1"></asp:Label>
						</td>
						<td width="200" align="left">
							<asp:TextBox ID="txtSearchClient" runat="server"></asp:TextBox>
						</td>
						<td width="100" align="left">
							<asp:Label ID="lblSearchChineseName" runat="server" Text="Chinese Name" meta:resourcekey="lblSearchChineseNameResource1"></asp:Label>
						</td>
						<td width="100" align="left">
							<asp:TextBox ID="txtSearchChineseName" runat="server"></asp:TextBox>
						</td>
						<td></td>
					</tr>
					<tr>
						<td align="left">
							<asp:Label ID="lblSearchName" runat="server" Text="Name" meta:resourcekey="lblSearchNameResource1"></asp:Label>
						</td>
						<td align="left">
							<asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox>
						</td>
						<td align="left">
							<asp:Label ID="lblSearchContactPerson" runat="server" Text="Contact Person" meta:resourcekey="lblSearchContactPersonResource1"></asp:Label>
						</td>
						<td align="left">
							<asp:TextBox ID="txtSearchContactPerson" runat="server"></asp:TextBox>
						</td>
						<td>
							<asp:Button ID="btnSearch" runat="server" CssClass="submit" Text="Search" CausesValidation="false" meta:resourcekey="btnSearchResource1" onclick="btnSearch_Click"/>
							<asp:Button ID="btnNewClient" runat="server" CausesValidation="False" CssClass="submit" Text="New Client" meta:resourcekey="btnNewClientResource1" onclick="btnNewClient_Click"/>
						</td>    
					</tr>
				</table>
			</fieldset>
		</asp:Panel>
		<table>
			<tr>
				<td align="center" width="100%">
					<asp:Label ID="lblError" runat="server" ForeColor="Red" Width="100%" CssClass="error"
						meta:resourcekey="lblErrorResource1"></asp:Label>
				</td>
			</tr>
		</table>
		<asp:Panel ID="panelActive" runat="server" meta:resourcekey="ActivePanelResource1">
			<fieldset>
				<legend>
					<asp:Label ID="lblActive" runat="server" Text="Active Clients" meta:resourcekey="lblActiveResource1"></asp:Label>
				</legend>
				<table align ="center" width="100%">
					<tr>
						<td>
							<asp:GridView CssClass="Grid" ID="gvActive" runat="server" 
								BackColor="#DEBA84" BorderColor="#660000"
								BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0" Width="100%"
								Height="1%" AllowPaging="True" PageSize="10" AllowSorting="True" 
								EmptyDataText="No Client Record Available!"
								AutoGenerateColumns="False" meta:resourcekey="gvActiveResource1" 
								DataKeyNames="Client"
								onpageindexchanging="gvActive_PageIndexChanging" 
								onrowcommand="OnRowCommand">
								<Columns>
									<asp:BoundField DataField="Client" HeaderText="Client" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource1"/>
									<asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource2"/>
									<asp:BoundField DataField="ChineseName" HeaderText="Chinese Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource3"/>
									<asp:BoundField DataField="Address" HeaderText="Address" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource4"/>
									<asp:BoundField DataField="ContactPerson" HeaderText="Contact Person" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource5"/>
									<asp:BoundField DataField="JobTitle" HeaderText="Job Title" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource6"/>
									<asp:BoundField DataField="Phone" HeaderText="Phone Number" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource7"/>
									<asp:BoundField DataField="Fax" HeaderText="Fax Number" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource8"/>
									<asp:BoundField DataField="UpdateIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource9"/>
									<asp:BoundField DataField="UpdateBy" HeaderText="Updated By" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource10"/>
									<asp:BoundField DataField="UpdateDate" HeaderText="Last Update Date" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource11"/>
									<asp:TemplateField HeaderText="" ItemStyle-Width="60" ItemStyle-HorizontalAlign="center">
										<ItemTemplate>
											<a href="OptClientsupdate.aspx?Client=<%# Eval("Client")%>"><img src="Images/icon-edit.gif" border="0" /></a>
											<asp:ImageButton ID="imgBtnDelete" CommandName="halfDelete" runat="server" ImageUrl="Images/icon-delete.jpg" OnClientClick="javascript:return confirm('Do you want to delete the record?');"/>
										</ItemTemplate>
									</asp:TemplateField>
							   </Columns>
								<HeaderStyle CssClass="GridHeaderStyle"/>
								<RowStyle CssClass="GridRowStyle" />
								<AlternatingRowStyle CssClass="GridAltRowStyle" />
								<SelectedRowStyle CssClass="GridSelectedRowStyle" />
								<PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
								<FooterStyle CssClass="GridFooterStyle" />
							</asp:GridView>
						</td>
					</tr>
				</table>
			</fieldset>
		</asp:Panel>
		<asp:Panel ID="panelDeleted" runat="server" meta:resourcekey="ActivePanelResource1">
			<fieldset>
				<legend>
					<asp:Label ID="lblDeleted" runat="server" Text="Deleted Clients" meta:resourcekey="lblDeletedResource1"></asp:Label>
				</legend>
				<table>
					<tr>
						<td>
							<asp:GridView CssClass="Grid" ID="gvDeleted" runat="server" 
								BackColor="#DEBA84" BorderColor="#660000"
								BorderStyle="Solid" BorderWidth="1px" CellPadding="0" CellSpacing="0" Width="100%"
								Height="1%" AllowPaging="True" PageSize="10" AllowSorting="True" 
								EmptyDataText="No Deleted Client Record Available."
								AutoGenerateColumns="False" meta:resourcekey="gvActiveResource1" 
								onpageindexchanging="gvDeleted_PageIndexChanging"
								DataKeyNames="Client"
								onrowcommand="OnRowCommand">
								<Columns>
									<asp:BoundField DataField="Client" HeaderText="Client" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource12"/>
									<asp:BoundField DataField="Name" HeaderText="Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource13"/>
									<asp:BoundField DataField="ChineseName" HeaderText="Chinese Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource14"/>
									<asp:BoundField DataField="Address" HeaderText="Address" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource15"/>
									<asp:BoundField DataField="ContactPerson" HeaderText="ContactPerson" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource16"/>
									<asp:BoundField DataField="JobTitle" HeaderText="Job Title" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource17"/>
									<asp:BoundField DataField="Phone" HeaderText="Phone Number" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource18"/>
									<asp:BoundField DataField="Fax" HeaderText="Fax Number" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource19"/>
									<asp:BoundField DataField="DeleteIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource20"/>
									<asp:BoundField DataField="DeleteBy" HeaderText="Deleted By" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource21"/>
									<asp:BoundField DataField="DeleteDate" HeaderText="Delete Date" HeaderStyle-Width="200"  ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource22"/>
									<asp:TemplateField ItemStyle-Width="60" ItemStyle-HorizontalAlign="center">
										<ItemTemplate>
											<asp:ImageButton ID="lbtnRestore" CommandName="Restore" runat="server" ImageUrl="Images/icon-restore.jpg"/>
											<asp:ImageButton ID="lbtnFroceDelete" CommandName="ForceDelete" runat="server" ImageUrl="Images/icon-trash.gif" OnClientClick="javascript:return confirm('Do you want to delete the record?');"/>
										</ItemTemplate>
									</asp:TemplateField>
								</Columns>
								<HeaderStyle CssClass="GridHeaderStyle"/>
								<RowStyle CssClass="GridRowStyle" />
								<AlternatingRowStyle CssClass="GridAltRowStyle" />
								<SelectedRowStyle CssClass="GridSelectedRowStyle" />
								<PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
								<FooterStyle CssClass="GridFooterStyle" />
							</asp:GridView>
						</td>
					</tr>
				</table>
			</fieldset>
		</asp:Panel>
	</div>
</asp:Content>
